package com.wenguo.bussines.dao.base;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;

public interface EntityDao<E,PK extends Serializable>{
	
	public E get(PK pk) throws DataAccessException;

	public List<E> getByEntity(E e)  throws DataAccessException;

	public List<E> getByMap(Map<Object,Object> map)  throws DataAccessException;

	public List<E> getByDefined(Map<Object,Object> map)  throws DataAccessException;
	
	public Object getCount(E e) throws DataAccessException;

	public List<E> getAll() throws DataAccessException;
	
	public boolean save(E e) throws DataAccessException;
	
	public boolean saveOrUpdate(E e) throws DataAccessException;
	
	public boolean update(E e) throws DataAccessException;

	public boolean updatePwd(E e) throws DataAccessException;
	
	public boolean delete(PK pk) throws DataAccessException;
	
	
}
